
export default {
    requestGet(url) {
        return new Promise((resolve, reject) => {
            axios({
                method: 'get',
                url: url
            }).then(function (response) {
                resolve(response.data);
            }).catch(function (error) {
                reject(error);
            });

        })
    },
    requestPost(url,params) {
        return new Promise((resolve, reject) => {
            axios({
                method: 'post',
                url: url,
                data:params
            }).then(function (response) {
                resolve(response.data);
            }).catch(function (error) {
                reject(error);
            });

        })
    },
}